package com.miao.shop.entity;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * @author MiaoWenqing
 * @description: 购物车
 * @date 2021/2/16 21:57
 */
public class ShopCarProduct {

    private String pId;
    private String pName;
    private String pIcon;
    private BigDecimal pPrice;
    private int pNum;
    private boolean isSelect;

    public String getpId() {
        return pId;
    }

    public void setpId(String pId) {
        this.pId = pId;
    }

    public String getpName() {
        return pName;
    }

    public void setpName(String pName) {
        this.pName = pName;
    }

    public String getpIcon() {
        return pIcon;
    }

    public void setpIcon(String pIcon) {
        this.pIcon = pIcon;
    }

    public BigDecimal getpPrice() {
        return pPrice;
    }

    public void setpPrice(BigDecimal pPrice) {
        this.pPrice = pPrice;
    }

    public int getpNum() {
        return pNum;
    }

    public void setpNum(int pNum) {
        this.pNum = pNum;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ShopCarProduct that = (ShopCarProduct) o;
        return Objects.equals(pId, that.pId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(pId);
    }

    @Override
    public String toString() {
        return "ShopCarProduct{" +
                "pId='" + pId + '\'' +
                ", pName='" + pName + '\'' +
                ", pIcon='" + pIcon + '\'' +
                ", pPrice=" + pPrice +
                ", pNum=" + pNum +
                ", isSelect=" + isSelect +
                '}';
    }
}
